/**
 * 表单类型
 */
export interface FormItemConfig {
  /**
   * 表单组件全局Id
   */
  id?: string,
  /**
   * 名称
   */
  name: string,
  /**
   * 分组  container, basic, advanced, system
   */
  group: string,
  /**
   * 类型  grid,
   */
  type: string,
  /**
   * 对应组件名称
   */
  component: string,
  /**
   * 对应配置组件
   */
  settingComponent: string,
  /**
   * 图标
   */
  selectIcon?: string,
  /**
   * 表单 formItem 配置
   */
  itemConfig?: ItemConfig,
  /**
   * 组件个性配置
   */
  config?: any,
  /**
   * 子组件列表
   */
  formList?: FormItemConfig[],
}

/**
 * 表单 formItem 配置
 */
export interface ItemConfig {
  tooltip?: string,
  label?: string,
  labelColFlex?: any,
  showColon?: boolean,
  required?: boolean,
  ruleType?: string,
  ruleMessage?: string,
  feedback?: boolean,
  ruleMatch?: string,
  validateTrigger?: string,
  asteriskPosition?: string,
  hideLabel?: boolean,
  hideAsterisk?: boolean
}

/**
 * 表单配置校验结果
 */
export interface ItemValidateResult {
  status: boolean,
  message?: string
}

/**
 * 表单权限
 * H 隐藏
 * R 只读
 * D 禁用
 * E 编辑
 */
export type FormPermission = 'H' | 'R' | 'D' | 'E';